import { createRouter, createWebHashHistory, createWebHistory, RouteRecordRaw } from 'vue-router'
import PhotDesignMain from '../views/Main/mainApp.vue'
import PhotAnalyze from '../components/phot_analyze/Content.vue'
import MaterialLibrary from '../components/phot_passive_device/material_manager/Content.vue'
import AddMaterial from '../components/phot_passive_device/add_material/Content.vue'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'PhotDesignMain',
    component: PhotDesignMain
  },
  {
    path: '/PhotAnalyze',
    name: 'PhotAnalyze',
    component: PhotAnalyze
  },
  {
    path: '/MaterialLibrary',
    name: 'MaterialLibrary',
    component: MaterialLibrary
  },
  {
    path: '/AddMaterial',
    name: 'AddMaterial',
    component: AddMaterial
  }
]

const router = createRouter({
  history: process.env.IS_ELECTRON ? createWebHashHistory(process.env.BASE_URL) : createWebHistory(process.env.BASE_URL),
  routes
})

export default router
